#!/bin/sh
# eotk (c) 2017 Alec Muffett
cd %PROJECT_DIR% || exit 1

%%IF %IS_SOFTMAP%
for hfile in `echo %PROJECT_DIR%/%TOR_WORKER_PREFIX%*.d/hostname` ; do
    test -f "$hfile" || continue
    onion=`cat $hfile`
    %%BEGIN
    echo %ONION_ADDRESS% %DNS_DOMAIN% %PROJECT% softmap via $onion
    %%END
done
%%ELSE
%%BEGIN
echo %ONION_ADDRESS% %DNS_DOMAIN% %PROJECT% hardmap
%%END
%%ENDIF

exit 0
